extends ../_layout
block content
   div.well 
      h1= 'Edit the message'
      
   if(user && user.role && user.role=='admin' && message)
      form(method='post')
         div.form-group
            div: input(type='hidden', name='_csrf', value='#{csrf}')
            div: input.form-control(type='text', name='title', placeholder='Message Title', value= message.title)
            div: textarea.form-control(rows='18', name='body', placeholder='Message Body')= message.body
         input.btn.btn-primary(type='submit', value='Save')
         a.btn.btn-info(href='/messages/list') Back
